<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>2.数组的every方法</title>
  </head>
  <body>
    <script type="text/javascript" >
      let arr = [
        {id:'f6asdfygu01',name:'张三',age:18,isMarry:true},
        {id:'f6asdfygu02',name:'李四',age:19,isMarry:true},
        {id:'f6asdfygu03',name:'王五',age:20,isMarry:true},
        {id:'f6asdfygu04',name:'赵六',age:21,isMarry:true},
      ]
      let arr2 = []

      /* 
        1.该数组方法接收什么参数 —— item,index,arr
        2.该数组方法传入的回调，是否写返回值？ —— 必须写，返回的是判断条件
        3.该数组方法是否修改原数组？—— 不修改
        4.该数组方法是否有返回值？—— 有，布尔值
      */
      /* let x = arr.every((item)=>{
        return item.isMarry === true
      }) */

      /* let x = arr.every((item)=>{
        return item.age >= 18
      })
      console.log(x) */

      let x = arr2.every((item)=>{
        return item > 5
      })
      console.log(x)
    </script>
  </body>
</html>